package fos

import scala.util.parsing.input.Positional

/** Abstract Syntax Trees for terms. 
 * 
 *  @author Jessa Bekker
 *  @author Nicolas Stucki
 */
abstract class Term extends Positional
trait Value
trait NumericalValue extends Value

case class IsZero(t: Term) extends Term
case class If(t1: Term, t2: Term, t3: Term) extends Term
case class Succ(t: Term) extends Term
case class SuccNV(t2: Term) extends Succ(t2) with NumericalValue { override def toString = Succ.toString + '(' + t + ')' }
case class Pred(t: Term) extends Term
case object Zero extends Term with NumericalValue
case object True extends Term with Value
case object False extends Term with Value

